import request from "@/utils/request";

/*志愿活动列表*/
export function getActivityList(page,limit,keyWord,startTime,endTime,status){
    return request({
        url: `/api/event/getByCondition/${page}/${limit}?keyWord=${keyWord}&startTime=${startTime}&endTime=${endTime}&status=${status}`,
        method: 'get',
    })
}

export function updateActivity(event){
    return request({
        url: '/api/event/addOrUpdateVolEvent}',
        method: 'post',
        data:event
    })
}

export function addActivityApi(event){
    return request({
        url: '/api/event/addOrUpdateVolEvent}',
        method: 'post',
        data: event
    })
}

export function deleteAApi(id){
    return request({
        url: `/api/event/deleteVolEventById/${id}`,
        method: 'post'
    })
}